From: emellor@ewan Date: Fri, 30 Sep 2005 10:55:49 +0000 (+0100) Subject: Added cache-control headers to pages returned by HTTP server so that pages X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16763^2~70 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=8d170a29890ec7eb6ac2c28cce5fe6ffcb359164;p=xen.git Added cache-control headers to pages returned by HTTP server so that pages expire immediately. This prevents navigation to stale pages. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/web/http.py b/tools/python/xen/web/http.py index 5cabb95e24..e11d8d29bd 100644 --- a/tools/python/xen/web/http.py +++ b/tools/python/xen/web/http.py @@ -437,6 +437,9 @@ class HttpRequest: send_body = self.hasBody() if not self.close_connection: self.setResponseHeader("Connection", "keep-alive") + self.setResponseHeader("Pragma", "no-cache") + self.setResponseHeader("Cache-Control", "no-cache") + self.setResponseHeader("Expires", "-1") if send_body: self.output.seek(0, 0) body = self.output.getvalue()